package swu.edu.cn.javaee.mapper;

import org.springframework.stereotype.Repository;
import swu.edu.cn.javaee.entity.Comment;

import java.util.List;
@Repository
public interface CommentMapper {
    //新增评论
    public void saveComment(Comment comment);
    /*public List<Comment> queryList();*/
    //根据查询用户所有评论
    public List<Comment> queryCommentByUid(String user_id);
    //根据评论id查询
    public Comment queryCommentById(String comment_id);
    //查询文章下所有评论
    public List<Comment> queryListByNews_id(String news_id);
    //修改评论
    public void updateComment(Comment comment);
    //删除评论
    public void deleteComment(Comment comment);
    //分页查询
    public List<Comment> queryListLimit(String page,String limit);
    public Integer counts(String news_id);
}
